package com.mef.smsplat.dao;

import java.util.List;

import org.springframework.stereotype.Repository;
import com.cqcis.base.orm.jdbc.BaseJdbcDao;
import com.mef.smsplat.dao.base.BaseSpringJdbcDao;
import com.mef.smsplat.domain.EtermConfigInfoDomain;


@Repository
public class EtermConfigInfoDao extends BaseSpringJdbcDao<EtermConfigInfoDomain, String> {
	
	/**
	 * 根据配置名查询配置
	 * @param configName 配置名
	 * @return
	 */
	public EtermConfigInfoDomain query(String configName){
		String sql="select * from eterm_config_info t where t.eterm_config_name=?";
		List<EtermConfigInfoDomain> list=super.query(sql, new Object[]{configName});
		if(list.size()>0)
			return list.get(0);
		return null;
	}
	
	@Override
	public BaseJdbcDao getDaoClass() {
		return this;
	}

	@Override
	public Class getEntityClass() {
		return EtermConfigInfoDomain.class;
	}

}
